package com.management.department.teacherinfosystem.Repository;

import com.management.department.teacherinfosystem.Entity.SocialService;
import com.management.department.teacherinfosystem.Entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SocialServiceRepository extends JpaRepository<SocialService, Long> {
    List<SocialService> findByUser(User user);
    List<SocialService> findByStatus(String status);

    @Query("select s from SocialService s join fetch s.user")
    List<SocialService> findAllWithUser();
} 